<?php
    class admin_controller_add extends controller
    {
        function run()
        {
            admin_controller_public_islogin::run();
            $this->data->title = '添加菜单';

            $admin_info = s('administrator_information');

            $admin_menu = new admin_model_menu();
            $menu_list  = $admin_menu->get_menu_list($admin_info['group_id']);

            $this->data->menu_list = $menu_list['menu_list'];

            $id = g('id');

            if ($id != '')
            {
                //获取id为$id的菜单信息

                $menu_info  = $admin_menu->get_one_menu($id);

                $this->data->menu_info = $menu_info;
            }
        }
    }